//
//  HomeViewController.m
//  ZhiShanUI
//
//  Created by 1 1 on 15/11/26.
//  Copyright © 2015年 Hiccup. All rights reserved.
//

#import "HomeViewController.h"
#import "XZMTabBarViewController.h"
#import "shequbianminViewController.h"
#import "shengxianViewController.h"
#import "jiaoyupeixunViewController.h"
#import "xiuxianyuleViewController.h"
#import "canyinViewController.h"
#import "shequgongyiViewController.h"
#import "QJZChangeCityViewController.h"


@interface HomeViewController ()<UIScrollViewDelegate>
{
    UIScrollView * _scrollView;
    UIPageControl * _pageControl;
    
    UIScrollView * lableScrollView;
    
    //__weak IBOutlet UIView *noticeView;
    
    UIScrollView * _viewscrool;
    
}
@end

@implementation HomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationController.navigationBar.barTintColor = [[UIColor alloc] initWithRed:230/255.0 green:55/255.0 blue:55/255.0 alpha:1.0];
    self.navigationItem.title = @"星河生活家";
    self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:20]};
    UIBarButtonItem* leftBt = [[UIBarButtonItem alloc] initWithCustomView:[self locationWithNSString:@"深圳"]]; //传一个位置字符
     self.navigationItem.leftBarButtonItem = leftBt;
    

    
    
    _viewscrool =[[UIScrollView alloc]initWithFrame:CGRectMake(0, 60, 375, 557)];
    _viewscrool.contentSize=CGSizeMake(0,769);
    _viewscrool.showsVerticalScrollIndicator=NO;
    _viewscrool.backgroundColor=[UIColor whiteColor];
    [self.view addSubview: _viewscrool];
    
    
//    UIButton *imagebuton=[[UIButton alloc]initWithFrame:CGRectMake(12, 257, 8, 7)];
//    [imagebuton setBackgroundImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
//    [_viewscrool addSubview:imagebuton];
//    
    UIImage *image12=[UIImage imageNamed:@"new.png"];
    UIImageView *image1=[[UIImageView alloc]initWithImage:image12];
    image1.frame=CGRectMake(12, 200, 8, 7);
    [_viewscrool  addSubview:image1];
 
    
    UIImage * img0 = [UIImage imageNamed:@"banner01.jpg"];
    UIImage * img1 = [UIImage imageNamed:@"banner01.jpg"];
    UIImage * img2 = [UIImage imageNamed:@"banner01.jpg"];
    [_viewscrool addSubview:[self scrollViewWithNSArray:@[img0,img1,img2]]];

    
    _pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, 145, self.view.frame.size.width, 40)];
    _pageControl.numberOfPages = 3;
    _pageControl.currentPageIndicatorTintColor = [UIColor redColor];
    _pageControl.pageIndicatorTintColor = [UIColor clearColor];
    [_pageControl addTarget:self action:@selector(changePages) forControlEvents:UIControlEventValueChanged];
    [ _viewscrool addSubview:_pageControl];

    /*NSTimer * timer0= */[NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(onTime) userInfo:nil repeats:YES];
    
	
    NSString * str0 = @"物业:小区紧急通知小区紧急通知小区紧急通知小区紧急通知0";
    NSString * str1 = @"物业:小区紧急通知小区紧急通知小区紧急通知小区紧急通知1";
    NSString * str2 = @"物业:小区紧急通知小区紧急通知小区紧急通知小区紧急通知2";
    NSString * str3 = @"物业:小区紧急通知小区紧急通知小区紧急通知小区紧急通知3";
    [_viewscrool addSubview:[self labelTextWithNSArray:@[str0,str1,str2,str3]]];
    
    UIButton * messageBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    messageBtn.frame = CGRectMake(27, 255, 206, 15);
    [messageBtn addTarget:self action:@selector(messageCenter) forControlEvents:UIControlEventTouchUpInside];
    [_viewscrool addSubview:messageBtn];
    [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(messageSlide) userInfo:nil repeats:YES];
    
    
    UIButton *button1=[[UIButton alloc]initWithFrame:CGRectMake(11, 220, 46, 51)];
    [button1 setBackgroundImage:[UIImage imageNamed:@"User-Profile.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    //propertyManagement
    
     [button1 addTarget:self  action:@selector(propertyManagement) forControlEvents:UIControlEventTouchUpInside];
    
    [_viewscrool addSubview:button1];
    
    UIButton *button2=[[UIButton alloc]initWithFrame:CGRectMake(88, 220, 46, 51)];
    [button2 setBackgroundImage:[UIImage imageNamed:@"Shopping-Bag@2X.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [_viewscrool addSubview:button2];
    
    UIButton *button3=[[UIButton alloc]initWithFrame:CGRectMake(165, 220, 46, 51)];
    [button3 setBackgroundImage:[UIImage imageNamed:@"Stats@2X.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [_viewscrool addSubview:button3];
    
    UIButton *button4=[[UIButton alloc]initWithFrame:CGRectMake(242, 220, 46, 51)];
    [button4 setBackgroundImage:[UIImage imageNamed:@"Map@2X.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [_viewscrool addSubview:button4];
    
    //第五个表示
    UIButton *button22=[[UIButton alloc]initWithFrame:CGRectMake(318, 220, 46, 51)];
    [button22 setBackgroundImage:[UIImage imageNamed:@"园区@2x.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [_viewscrool addSubview:button22];
    
    
    
    
    
    
    UILabel *lab2=[[UILabel alloc]initWithFrame:CGRectMake(21, 275, 40,14)];
    lab2.text=@"社区";
    lab2.numberOfLines=0;
    lab2.textColor=[UIColor blackColor];
    lab2.font=[UIFont systemFontOfSize:16];
    [_viewscrool addSubview:lab2];
    
    UILabel *lab3=[[UILabel alloc]initWithFrame:CGRectMake(98, 275, 40,14)];
    lab3.text=@"商场";
    lab3.numberOfLines=0;
    lab3.textColor=[UIColor blackColor];
    lab3.font=[UIFont systemFontOfSize:16];
    [_viewscrool addSubview:lab3];
    
    UILabel *lab4=[[UILabel alloc]initWithFrame:CGRectMake(175, 275, 40,14)];
    lab4.text=@"理财";
    lab4.numberOfLines=0;
    lab4.textColor=[UIColor blackColor];
    lab4.font=[UIFont systemFontOfSize:16];
    [_viewscrool addSubview:lab4];
    
    UILabel *lab5=[[UILabel alloc]initWithFrame:CGRectMake(252, 275, 40,14)];
    lab5.text=@"购房";
    lab5.numberOfLines=0;
    lab5.textColor=[UIColor blackColor];
    lab5.font=[UIFont systemFontOfSize:16];
    [_viewscrool addSubview:lab5];
    
    UILabel *lab22=[[UILabel alloc]initWithFrame:CGRectMake(329, 275, 40,14)];
    lab22.text=@"园区";
    lab22.numberOfLines=0;
    lab22.textColor=[UIColor blackColor];
    lab22.font=[UIFont systemFontOfSize:16];
    [_viewscrool addSubview:lab22];
    
    

    
    
    
    UIButton *buttonban1=[[UIButton alloc]initWithFrame:CGRectMake(0,316,375,66)];
    [buttonban1 setBackgroundImage:[UIImage imageNamed:@"bannerss.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [_viewscrool addSubview:buttonban1];
    
    UIButton *buttonban2=[[UIButton alloc]initWithFrame:CGRectMake(0,397,185,65)];
    [buttonban2 setBackgroundImage:[UIImage imageNamed:@"丽思卡尔顿酒店banner.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [_viewscrool addSubview:buttonban2];
    
    UIButton *buttonban3=[[UIButton alloc]initWithFrame:CGRectMake(191,397,185,65)];
    [buttonban3 setBackgroundImage:[UIImage imageNamed:@"东山珍珠岛banner.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    
    
    [_viewscrool addSubview:buttonban3];
    
    UILabel *lab1=[[UILabel alloc]initWithFrame:CGRectMake(12, 468, 56, 14)];
    lab1.text=@"周边信息";
    lab1.numberOfLines=0;
    lab1.textColor=[UIColor grayColor];
    //lab1.textColor=[UIColor colorWithRed:150 green:150 blue:150 alpha:1.0];
    [_viewscrool addSubview:lab1];
    
    UIButton *butto=[[UIButton alloc]initWithFrame:CGRectMake(191,468,185,65)];
    //[butto setBackgroundImage:[UIImage imageNamed:@"东山珍珠岛banner.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [butto 	setTitle:@"···更多" forState:UIControlStateNormal];
    butto.tintColor=[UIColor blackColor];
    [butto addTarget:self action:@selector(zhoubianbut) forControlEvents:UIControlEventTouchUpInside];
    
    [_viewscrool addSubview:butto];
    
    
    
    
    UIButton *button6=[[UIButton alloc]initWithFrame:CGRectMake(12,492,351,100)];
    [button6 setBackgroundImage:[UIImage imageNamed:@"社区便民ss.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [button6 addTarget:self  action:@selector(shequbianmin) forControlEvents:UIControlEventTouchUpInside];
    [_viewscrool addSubview:button6];
    
    UIButton *button7=[[UIButton alloc]initWithFrame:CGRectMake(12,598,351,100)];
    [button7 setBackgroundImage:[UIImage imageNamed:@"生鲜配送ss.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [button7 addTarget:self  action:@selector(shengxianpeisong) forControlEvents:UIControlEventTouchUpInside];
    [_viewscrool addSubview:button7];
    
    UIButton *button8=[[UIButton alloc]initWithFrame:CGRectMake(12,703,71,41)];
    [button8 setBackgroundImage:[UIImage imageNamed:@"教育培训ss.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [button8 addTarget:self  action:@selector(jiaoyupeixun) forControlEvents:UIControlEventTouchUpInside];
    [_viewscrool addSubview:button8];
    
    UIButton *button9=[[UIButton alloc]initWithFrame:CGRectMake(105,703,71,41)];
    [button9 setBackgroundImage:[UIImage imageNamed:@"ssss休闲娱乐.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [button9 addTarget:self  action:@selector(xiuxianyule) forControlEvents:UIControlEventTouchUpInside];
    [_viewscrool addSubview:button9];
    
    UIButton *button11=[[UIButton alloc]initWithFrame:CGRectMake(199,703,71,41)];
    [button11 setBackgroundImage:[UIImage imageNamed:@"餐饮sd.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [button11 addTarget:self  action:@selector(canyin) forControlEvents:UIControlEventTouchUpInside];
    [_viewscrool addSubview:button11];
    
    UIButton *button12=[[UIButton alloc]initWithFrame:CGRectMake(292,703,71,41)];
    [button12 setBackgroundImage:[UIImage imageNamed:@"社区公益ss.png"] forState:UIControlStateNormal];
    //[button1 setImageEdgeInsets:@"User-Profile@2X.png"];
    [button12 addTarget:self  action:@selector(shequgongyi) forControlEvents:UIControlEventTouchUpInside];
    [_viewscrool addSubview:button12];
    
    
    
    UILabel *lab6=[[UILabel alloc]initWithFrame:CGRectMake(23, 748,49,20)];
    lab6.text=@"教育培训";
    lab6.numberOfLines=0;
    lab6.textColor=[UIColor blackColor];
    lab6.font=[UIFont systemFontOfSize:12];
    [_viewscrool addSubview:lab6];
    
    UILabel *lab7=[[UILabel alloc]initWithFrame:CGRectMake(116, 748,49,20)];
    lab7.text=@"休闲娱乐";
    lab7.numberOfLines=0;
    lab7.textColor=[UIColor blackColor];
    lab7.font=[UIFont systemFontOfSize:12];
    [_viewscrool addSubview:lab7];
    
    UILabel *lab8=[[UILabel alloc]initWithFrame:CGRectMake(222, 748,49,20)];
    lab8.text=@"餐饮";
    lab8.numberOfLines=0;
    lab8.textColor=[UIColor blackColor];
    lab8.font=[UIFont systemFontOfSize:12];
    [_viewscrool addSubview:lab8];
    
    UILabel *lab9=[[UILabel alloc]initWithFrame:CGRectMake(303, 748,49,20)];
    lab9.text=@"社区公益";
    lab9.numberOfLines=0;
    lab9.textColor=[UIColor blackColor];
    lab9.font=[UIFont systemFontOfSize:12];
    [_viewscrool addSubview:lab9];
    
    
    
   
}

-(void ) zhoubianbut
{
    
    NSLog(@"");

}


-(void ) shequbianmin
{
    
    
    shequbianminViewController *demoVC=[[shequbianminViewController alloc]init];
    [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];
    
}
-(void ) shengxianpeisong
{
    
    
    shengxianViewController *demoVC=[[shengxianViewController alloc]init];
    [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];
}

-(void ) jiaoyupeixun
{
    
    
    
    jiaoyupeixunViewController *demoVC=[[jiaoyupeixunViewController alloc]init];
    [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];
    
    
    
}
-(void ) xiuxianyule
{
    
    
    
    xiuxianyuleViewController *demoVC=[[xiuxianyuleViewController alloc]init];
    [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];

    
}


-(void ) canyin
{
    
    canyinViewController *demoVC=[[canyinViewController alloc]init];
    [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];
    
}
-(void ) shequgongyi
{
    
    
    shequgongyiViewController *demoVC=[[shequgongyiViewController alloc]init];
    [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];
    
}







#pragma mark - 导航左侧位置信息
//导航栏定位信息,传一个位置字符
-(UIButton *)locationWithNSString:(NSString *)weizhi {
    UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(0, 0, 60, 30);
    [button setImage:[UIImage imageNamed:@"location@2X.png"] forState:UIControlStateNormal];
    [button setTitle:weizhi forState:UIControlStateNormal];
    [button addTarget:self action:@selector(locationClick) forControlEvents:UIControlEventTouchUpInside];
    return button;
}

#pragma mark - 图片滑动视图
-(UIScrollView *)scrollViewWithNSArray:(NSArray *)imageArray {
    
    _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 375, 192)];
    _scrollView.pagingEnabled = YES;
    _scrollView.contentSize = CGSizeMake(self.view.frame.size.width*imageArray.count, 192);
    self.automaticallyAdjustsScrollViewInsets = NO;
    for (int i =0; i<imageArray.count;i++) {
        UIButton * imageButton = [UIButton buttonWithType:UIButtonTypeCustom];
        imageButton.frame = CGRectMake(self.view.frame.size.width*i, 0, self.view.frame.size.width, 192);
        [imageButton setImage:[imageArray objectAtIndex:i] forState:UIControlStateNormal];
        imageButton.tag = i;
        [imageButton addTarget:self action:@selector(scrollViewImageButtonClick:) forControlEvents:UIControlEventTouchUpInside];
        [_scrollView addSubview:imageButton];

    }
    _scrollView.showsHorizontalScrollIndicator = NO;
    _scrollView.showsVerticalScrollIndicator = NO;

    //设置代理
    _scrollView.delegate = self;

    
    return _scrollView;
}

#pragma mark - 通知显示滑动视图
-(UIScrollView *)labelTextWithNSArray:(NSArray *)textArray {
    //
    NSString * lastStr = [textArray firstObject];
    NSMutableArray * txtArray = [[NSMutableArray alloc] initWithCapacity:0];
    [txtArray addObjectsFromArray:textArray];
    [txtArray addObject:lastStr];
    lableScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(27, 195, self.view.frame.size.width-27, 15)];
    lableScrollView.pagingEnabled = YES;
    lableScrollView.contentSize = CGSizeMake(self.view.frame.size.width-27, 15*txtArray.count);
    for (int i = 0; i < txtArray.count; i++) {
        NSString * text = [txtArray objectAtIndex:i];
        NSArray *array = [text componentsSeparatedByString:@":"];
        UILabel * label1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 15*i, 37, 15)];
        label1.textColor = [UIColor redColor];
        label1.text = [NSString stringWithFormat:@"%@：",array[0]];
        label1.font = [UIFont systemFontOfSize:12];
        [lableScrollView addSubview:label1];
        UIColor *color1=[UIColor colorWithRed:100/255 green:100/255 blue:100/255 alpha:1];
        UILabel * label2 = [[UILabel alloc] initWithFrame:CGRectMake(37, 15*i, 310, 15)];
        label2.textColor = color1;
        label2.text = array[1];
        label2.font = [UIFont systemFontOfSize:12];
        [lableScrollView addSubview:label2];
    }
    lableScrollView.showsHorizontalScrollIndicator = NO;
    lableScrollView.showsVerticalScrollIndicator = NO;
    return lableScrollView;
}

#pragma mark - UIScrollViewDelegate
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
    _pageControl.currentPage = _scrollView.contentOffset.x/self.view.frame.size.width;
}

#pragma mark - 点击pageControl方法
-(void)changePages {
    [_scrollView setContentOffset:CGPointMake(_pageControl.currentPage*self.view.frame.size.width, 0) animated:YES];
}



#pragma mark - 点击滑动视图上的图片的方法
-(void)scrollViewImageButtonClick:(UIButton *)imageButton {
//    NSLog(@"image=%ld",(long)imageButton.tag);
}

#pragma mark - 导航栏左按钮的点击方法
-(void)locationClick {
//    [self.navigationController pushViewController:[QJZChangeCityViewController new] animated:YES];
    [self presentViewController:[QJZChangeCityViewController new] animated:YES completion:nil];
}

#pragma mark - 物业按钮方法
- (IBAction)propertyManagement:(id)sender {
    
//    wuyemeiyouViewController *demoVC=[[wuyemeiyouViewController alloc]init];
//    
//
    
    XZMTabBarViewController *demoVC=[[XZMTabBarViewController alloc]init];
     [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];
    
    NSLog(@"物业");
}

-(void) propertyManagement
{
    XZMTabBarViewController *demoVC=[[XZMTabBarViewController alloc]init];
    [demoVC setHidesBottomBarWhenPushed:YES];
    demoVC.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:demoVC animated:YES completion:NULL];
    
    NSLog(@"物业");



}




#pragma mark - 商圈按钮方法
- (IBAction)tradingArea:(id)sender {
    NSLog(@"商圈");
}

#pragma mark - 金融按钮方法
- (IBAction)financial:(id)sender {
    NSLog(@"金融");
}

#pragma mark - 地产按钮方法
- (IBAction)landedEstate:(id)sender {
    NSLog(@"地产");
}

#pragma mark - 超级星期三的方法
- (IBAction)superWednesday:(id)sender {
    NSLog(@"超级星期三");
}

#pragma mark - 星河地产
- (IBAction)selectiveTrials:(id)sender {
    NSLog(@"星河地产首届业主时尚达人选拔赛");
}

#pragma mark - 更多
- (IBAction)more:(id)sender {
    NSLog(@"更多");
}

#pragma mark - 租房
- (IBAction)renting:(id)sender {
    NSLog(@"租房");
}

#pragma mark - 餐饮美食
- (IBAction)food:(id)sender {
     NSLog(@"餐饮美食");
}

#pragma mark - 月嫂保姆
- (IBAction)nanny:(id)sender {
     NSLog(@"月嫂保姆");
}

#pragma mark - 保洁
- (IBAction)cleaning:(id)sender {
 NSLog(@"保洁");
}

#pragma mark - 家教
- (IBAction)tutor:(id)sender {
     NSLog(@"家教");
}

#pragma mark - 租车
- (IBAction)rentingCar:(id)sender {
     NSLog(@"租车");
}

#pragma mark - 跳转到消息中心
-(void)messageCenter {
    NSLog(@"消息中心");
}



#pragma mark - 定时器方法
//图片定时器
-(void)onTime {
    static int speed=1;
    _pageControl.currentPage+=speed;
    if (_pageControl.currentPage==2||_pageControl.currentPage==0) {
        speed=-speed;
    }
    [_scrollView setContentOffset:CGPointMake(_pageControl.currentPage*self.view.frame.size.width, 0) animated:YES];
}
//消息定时器
-(void)messageSlide {
    static int speed = 15;
    if (lableScrollView.contentOffset.y == lableScrollView.contentSize.height - lableScrollView.bounds.size.height) {
        [lableScrollView setContentOffset:CGPointMake(0, 0) animated:NO];
    }
    float a = lableScrollView.contentOffset.y;
    a += speed;
    [lableScrollView setContentOffset:CGPointMake(0, a) animated:YES];
}
- (IBAction)shangquan:(id)sender {
}

#pragma mark -
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
